package org.altran.jee6.embedded.samples;

import javax.ejb.Stateless;
import javax.inject.Inject;
import javax.naming.NamingException;

import org.loko.JNDITree;

/**
 * Hello world!
 */
@Stateless
public class App {
	@Inject private DummyPOJO pojo;
    public static String sayHello(String name) {
        return "Hello " + name;
    }
    
    public void poko() throws NamingException{
    	if(null == pojo){
    		System.out.println("####loko");
        	JNDITree tree = new JNDITree();
        	tree.printJNDITree("");
    		System.out.println("####ERROR Not injected!");
    		return;
    	}
    	System.out.println(pojo.toString());
    	

    }
}